package org.linlinjava.litemall.db.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Getter
@Setter
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName(value = "t_goods", autoResultMap = true)
public class Goods extends BaseModel{

    @TableField("goods_sn")
    private String goodsSn;

    @TableField("name")
    private String name;

    @TableField("category_id")
    private Long categoryId;

    @TableField("brand_id")
    private Long brandId;

    @TableField(value = "gallery", typeHandler = JacksonTypeHandler.class)
    private String[] gallery;
    
    @TableField("keywords")
    private String keywords;

    @TableField("brief")
    private String brief;

    @TableField("is_on_sale")
    private Boolean isOnSale;

    @TableField("sort_order")
    private Short sortOrder;

    @TableField("pic_url")
    private String picUrl;

    @TableField("share_url")
    private String shareUrl;

    @TableField("is_new")
    private Boolean isNew;

    @TableField("is_hot")
    private Boolean isHot;

    @TableField("unit")
    private String unit;

    @TableField("counter_price")
    private BigDecimal counterPrice;

    @TableField("retail_price")
    private BigDecimal retailPrice;

    @TableField("detail")
    private String detail;
}